
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                            global.h
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                                    Forrest Yu, 2005
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

/* EXTERN is defined as extern except in global.c */
#ifdef	GLOBAL_VARIABLES_HERE
#undef	EXTERN
#define	EXTERN
#endif

EXTERN	int		ticks;

EXTERN  int 		mouse_count;
EXTERN  int		mouse_color;
EXTERN  int		mouse_x;
EXTERN  int		mouse_y;
EXTERN  int		old_x;
EXTERN	int		old_y;

EXTERN  int 		x_sign;
EXTERN  int 		y_sign;
EXTERN	int		NumOfWin;
EXTERN	struct MessageQueue	SysMessages; 	//Queue that stores all the messages in our GUI system
EXTERN	struct Message	TempMouseMsg;		//Temporary Variable: used by mouse handler to create a primary message
EXTERN  struct Window	WinRegister[MAX_WIN_NUM]; //整个界面所有窗口的大数组，包含各式各样的window

EXTERN	int		disp_pos;
EXTERN	u8		gdt_ptr[6];	// 0~15:Limit  16~47:Base
EXTERN	DESCRIPTOR	gdt[GDT_SIZE];
EXTERN	u8		idt_ptr[6];	// 0~15:Limit  16~47:Base
EXTERN	GATE		idt[IDT_SIZE];

EXTERN	u32		k_reenter;

EXTERN	TSS		tss;
EXTERN	PROCESS*	p_proc_ready;

EXTERN	int		nr_current_console;

extern	PROCESS		proc_table[];
extern	char		task_stack[];
extern  TASK            task_table[];
extern  TASK            user_proc_table[];
extern	irq_handler	irq_table[];
extern	TTY		tty_table[];
extern  CONSOLE         console_table[];


